package common;

/**
 * @author ever
 */
public class FileOutPut {

    public String classPath;

    public String outPutPath;

    public FileOutPut(String classPath, String outPutPath) {
        this.classPath = classPath;
        this.outPutPath = outPutPath;
    }

    public String getClassPath() {
        return classPath;
    }

    public void setClassPath(String classPath) {
        this.classPath = classPath;
    }

    public String getOutPutPath() {
        if (StringUtils.isNotBlank(this.outPutPath)) {
            if (this.outPutPath.lastIndexOf(".java") > -1) {
                this.outPutPath = this.outPutPath.replaceAll("(\\.java)$", ".class");
            }
        }
        return outPutPath;
    }

    public void setOutPutPath(String outPutPath) {
        this.outPutPath = outPutPath;
    }
}
